package com.snack.shop.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 跑腿订单详情实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_errand_order")
@Schema(description = "跑腿订单详情")
public class ErrandOrder extends BaseEntity {

    @Schema(description = "订单ID")
    @TableField("order_id")
    @JsonProperty("orderId")
    private Long orderId;

    @Schema(description = "服务类型：2-取快递，3-取外卖，4-代取奶咖")
    @TableField("service_type")
    @JsonProperty("serviceType")
    private Integer serviceType;

    @Schema(description = "代取分类ID")
    @TableField("category_id")
    @JsonProperty("categoryId")
    private Long categoryId;

    @Schema(description = "取件地址")
    @TableField("pickup_address")
    @JsonProperty("pickupAddress")
    private String pickupAddress;

    @Schema(description = "取件码")
    @TableField("pickup_code")
    @JsonProperty("pickupCode")
    private String pickupCode;

    @Schema(description = "取件备注")
    @TableField("pickup_remark")
    @JsonProperty("pickupRemark")
    private String pickupRemark;

    @Schema(description = "第一组图片（JSON数组字符串：取快递-快递单号截图数组，其他-订单截图数组）")
    @TableField("first_image")
    @JsonProperty("firstImage")
    private String firstImage;

    @Schema(description = "第二组图片（JSON数组字符串：取快递-身份码截图数组，其他-取餐码截图数组）")
    @TableField("second_image")
    @JsonProperty("secondImage")
    private String secondImage;

    @Schema(description = "送达地址")
    @TableField("delivery_address")
    @JsonProperty("deliveryAddress")
    private String deliveryAddress;

    @Schema(description = "收件人姓名")
    @TableField("receiver_name")
    @JsonProperty("receiverName")
    private String receiverName;

    @Schema(description = "收件人电话")
    @TableField("receiver_phone")
    @JsonProperty("receiverPhone")
    private String receiverPhone;

    @Schema(description = "配送备注")
    @TableField("delivery_remark")
    @JsonProperty("deliveryRemark")
    private String deliveryRemark;

    @Schema(description = "取件照片（JSON数组）")
    @TableField("pickup_images")
    @JsonProperty("pickupImages")
    private String pickupImages;

    @Schema(description = "送达照片（JSON数组）")
    @TableField("delivery_images")
    @JsonProperty("deliveryImages")
    private String deliveryImages;

    @Schema(description = "取件时间")
    @TableField("pickup_time")
    @JsonProperty("pickupTime")
    private LocalDateTime pickupTime;

    @Schema(description = "送达时间")
    @TableField("delivery_time")
    @JsonProperty("deliveryTime")
    private LocalDateTime deliveryTime;
}

